using FluentNHibernate.Conventions;
using FluentNHibernate.Mapping;

namespace Webshop20.Infrastructure.Persistence.NH.AutoMappings.Conventions.Common
{
    public class ParentForeignKeyNameConvention : IReferenceConvention
    {

        public bool Accept(IManyToOnePart target)
        {
            return true;
        }

        public void Apply(IManyToOnePart target)
        {
            target.ColumnName(target.Property.Name + "Id");
        }
    }
}